package com.mf.pte.core;

import com.ptc.cipjava.jxthrowable;
import com.ptc.pfc.pfcSession.CreoCompatibility;
import com.ptc.pfc.pfcSession.Session;
import com.ptc.pfc.pfcSession.pfcSession;
import com.ptc.wfc.wfcSession.WSession;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

public class AssemblyProcessSystem {

    private Session session;
    private WSession wSession;

    public AssemblyProcessSystem()  {
        try {
            session = pfcSession.GetCurrentSession();
        } catch (jxthrowable e) {
            e.printStackTrace();
        }
        wSession = (WSession)session;
//
//        try {
//            FileWriter file = new FileWriter("log.txt");
//            BufferedWriter bufferedWriter = new BufferedWriter(file);
//            bufferedWriter.write(wSession.toString());
//            ArrayList<String> strings = new ArrayList<>();
//            strings.add(session.GetCurrentModel().GetFullName());
//            new BomExportUtil(wSession,"hello").exportBom(strings);
//            StringBuilder stringBuilder = new StringBuilder();
//            for (int i = 0; i < strings.size(); i++) {
//                stringBuilder.append(strings.get(i)).append('\n');
//            }
//            bufferedWriter.write(stringBuilder.toString());
//            bufferedWriter.close();
//        } catch (Exception e) {
//            e.printStackTrace();
//        }


    }


}
